Technical Field
The present disclosure relates to a method and system of optimally compiling a PLC (Programmable Logic Controller) command, and in particular, a method of optimally compiling the PLC command, in which, in order to improve a compile or compiler processing scheme for a PLC command to be compiled by a PADT (Programming And Debugging Tool) compiler, the user's program may be optimized by choosing a rate option or a size option based on a user's environment to compile the command by a compile processing scheme optimized for a rate or for a size.
Description of the Related Art
A system such as a factory automation system at an industrial field employs an integrated control apparatus such as a Programmable Logic Controller (PLC). The PLC is equipped with a universal Main Processing Unit (MPU) as a fundamental unit. The MPU performs a compiling process of converting a program, which a user has written using a Programming And Debugging Tool (PADT), into codes which the PLC can recognize.
Therefore, in order to drive the PLC, the program written by the user using the PADT should be converted such that the MPU can recognize it.
The PADT is software which executes programming, editing, and debugging functions. The PADT executes functions of compiling a command in a project created by a user such the PLC can recognize it and then downloading to the PLC.
At this time, the command may be compiled by the PADT in a variety of methods and may be varied in, e.g., an execution rate or a modifiability, depending on the employed methods.
Meanwhile, a processing rate of command and a size of program are the key factors with respect to the performance of the PLC. Specifically, the higher the processing rate is, the productivity can increase, and the larger the size of the program is, the more input/output can be controlled.
In a prior art, the PLC supports only a fixed processing rate of command and a fixed size of program and thus cannot flexibly modify the processing rate of command and the size of program suitably to characteristics of a system.
Therefore, there are problems that the PLC should be replaced with an upper version thereof or the system should be changed when the command processing rate is low or the program size is insufficient in actual practice.